1. Field of the Invention
The present invention relates to an apparatus and a method for controlling a bit rate. More particularly, the present invention relates to an apparatus and a method for controlling a bit rate by adopting factors of coding complexity.
2. Description of the Related Art
With the development of microprocessors, semiconductors and digital signal processors, the technology for digitizing, storing, and transmitting an image signal has rapidly developed. However, when an image signal is stored and transmitted digitally, a bandwidth of the uncompressed image signal is very large compared to an analog transmission. Thus, the digital image signal needs to be compressed to remove surplus information to economically and efficiently utilize a transmission channel and a storage medium.
To meet this requirement, a Discrete Cosine Transform (DCT)-based compression method is widely used to compress image signals. In the DCT-based compression method, the spectrum of the image signal on which DCT is performed is concentrated in the low frequency portion. Thus, image information of a raw image signal can be fully represented by using a small number of bits by fully coding the low frequency portion.
Also, variable length coding (VLC) is performed on the image signal in which the DCT has been performed so as to compress the image signal. The VLC variably allocates and transmits predetermined code words with reference to the probability density of image information. Thus, the VLC is suitable for non-uniformly distributed image information to be processed. Therefore, DCT-based VLC is very appropriate as a compression method for fully representing the image signal comprising the non-uniformly distributed image information.
However, a controlled bit rate is required to transmit bits of the non-uniformly generated image signal when the non-uniformly distributed image information is compressed, at a constant transmission rate in order to maintain a stable system. In other words, when compressed image signals using VLC are stored or transmitted, a bit rate per unit time must be constant. Thus, a buffer should be installed to control the bit rate. Here, the quantization level of a quantizer should be adjusted to control the bit rate.
FIG. 1 is a block diagram of a conventional DCT-based compressor. Referring to FIG. 1, a conventional DCT-based compressor 100 comprises a discrete cosine transformer 101, a quantizer 103, a variable length coder 105, a buffer 107, an inverse quantizer 109, an inverse discrete cosine transformer 111, a motion estimator 113, a motion compensator 115, and a frame memory 117. The conventional DCT-based compressor 100 further comprises a complexity operator 119 and a bit rate controller 120.
The discrete cosine transformer 101 performs DCT on a frame of an input image signal to be compressed to transform the image signal over a space into energy distribution over a frequency. The quantizer 103 approximates coefficient data output from the discrete cosine transformer 101 to a finite number of values and scans the values in a zigzag manner to one-dimensionally rearrange the values. Here, the quantizer 103 performs a quantization process based on a quantization level Q output from the bit rate controller 120. Here, the quantization level Q is also called a quantization parameter in the Motion Picture Experts Group (MPEG)-4 specifications.
The variable length coder 105 performs VLC on data output from the quantizer 103 to compress the data. The buffer 107 sequentially stores data output from the variable length coder 105 and sequentially outputs the data. Thus, the buffer 107 can recognize bit rate information R of the frame to be compressed. The buffer 107 also provides bit rate information R of a frame (hereinafter referred to as an ‘immediately-preceding frame’) immediately preceding the frame to be compressed to the bit rate controller 120.
The inverse quantizer 109 receives the data from the quantizer 103 and inverse-quantizes the data. The inverse discrete cosine transformer 111 performs inverse DCT on data output from the inverse quantizer 109 to decode the data into a raw image signal. The motion estimator 113 generates a motion vector M.V. according to data and the raw image signal output from the inverse discrete cosine transformer 111. The motion compensator 115 estimates motion compensation from the immediately-preceding frame or a plurality of previous frames in the order of coding according to the motion vector M.V. output from the motion estimator 113 and outputs the estimation result. Reference numeral 117 denotes the frame memory for storing image information transmitted via the inverse discrete cosine transformer 111 or the like.
The bit rate controller 120 comprises a target bit rate operator 121 and a quantization level operator 125. The complexity operator 119 determines coding complexity of the frame to be compressed to generate a complexity coefficient S. The bit rate controller 120 receives the complexity coefficient S from the complexity operator 119 and the bit rate information R of the immediately-preceding frame from the buffer 107. The target bit rate operator 121 generate a target bit rate RT of the frame to be compressed based on bit rate information R of the previous frames comprising the immediately-preceding frame and bit rates of uncompressed frames of the image signal and outputs the target bit rate RT to the quantizer level operator 125. The quantization level operator 125 calculates the quantization level Q based on the target bit rate RT and the complexity coefficient S output from the complexity operator 119 for using Equation 1:RT=X1×S×Q−1+X2×S×Q−2  (1)wherein RT denotes the target bit rate of the frame to be compressed, S denotes the complexity coefficient, Q denotes the quantization level, and X1 and X2 denote modeling parameters that can vary to provide optimal compression for any compressor. Equation 1 is described based on the MPEG-4 specifications, which is hereby incorporated by reference.
The quantization level Q generated by the quantization level operator 125 is output to the quantizer 103. Accordingly, the frame to be compressed is compressed in control of the bit rate based on the complexity coefficient S of the immediately-preceding frame.
As described above, the conventional DCT-based compressor 100 additionally comprises the complexity operator 119. However, the complexity operator 119 determines the complexity coefficient S using the raw image signal, which causes a compression velocity to become slower. Also, since the complexity operator 119 determines the complexity coefficient S in the unit of pixel, a high capacity memory is required. Thus, per unit manufacturing cost of the conventional DCT-based compressor 100 may increase. In addition, in a case where the complexity operator 119 is not reflected on already-designed hardware, the complexity operator 119 may not be applied.